<template>
	<view>
		<image src="/static/common/bg1.png" class="pagebg1" mode=""></image>
		<u-navbar :safeAreaInsetTop="true" title="积分兑换" :autoBack="true" :bgColor="'rgba(255,255,255,'+opc+')'"
			placeholder>

		</u-navbar>
		<view class="pagecon" style="padding-top: 0;">
			<!-- <u-swiper :list="list1" height="203rpx" radius="30rpx" bgColor="transparent"></u-swiper> -->
			<view class="top">
				<image src="/static/task/hb.png" class="top__hb" mode=""></image>
				<image src="/static/task/yun.png" class="top__yun" mode=""></image>
				<view class="u-flex u-flex-items-end" style="padding-top: 75rpx;">
					<view class="top__num">
						{{userInfo.score}}
					</view>
					<view class="top__text">
						积分
					</view>
				</view>
				<view class="u-flex u-flex-y-center top__t" @click="navto('/pages/points/details')">
					积分明细<u-icon name="arrow-right" size="20rpx"></u-icon>
				</view>

				<u-button @click="navto('/pages/points/orderlist?status=0')"
					:customStyle="{width:'180rpx',height:'68rpx',padding:0,fontSie:'26rpx',margin:'0 0 0 42rpx',}"
					shape='circle' color="#ff5840" text="兑换记录"></u-button>
			</view>

			<view class="" style="height: 30rpx;">

			</view>
			<view class=""
				:style="{height:'calc(100vh - 44px - 203rpx - 60rpx - '+$u.addUnit($u.sys().statusBarHeight)+')'}">
				<scroll-view scroll-y="true" style="height: 100%;">
					<view class="list">
						<proitem1 v-for="(item,index) in list6" :key="index" :info="item"></proitem1>
					</view>
				</scroll-view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		exchangegoodlist
	} from "@/request/api/goods.js"
	import {
		userInfo
	} from "@/request/api/my.js"
	import proitem1 from "@/components/proitem/proitem1.vue"
	export default {
		data() {
			return {
				opc: 0,
				list1: [],
				list6: [],
				userInfo: {
					score: 0
				}
			};
		},
		components: {
			proitem1
		},
		onShow() {
			userInfo().then(res => {
				this.userInfo = res.data;
			})
		},
		onLoad() {
			exchangegoodlist().then(res => {
				this.list6 = res.data;
				console.log(this.list6)
			})
		}
	}
</script>

<style lang="scss">
	.pagecon {
		padding: 30rpx 30rpx 0;

	}

	.top {
		height: 300rpx;
		position: relative;

		&__hb {
			width: 266rpx;
			height: 297rpx;
			position: absolute;
			bottom: 0;
			right: 50rpx;
		}

		&__yun {
			width: 559rpx;
			height: 222rpx;
			position: absolute;
			bottom: -152rpx;
			right: 0;
		}

		&__num {
			font-family: DINNextLTPro;
			font-weight: 500;
			font-size: 95rpx;
			color: #000000;
			line-height: 43rpx;
			margin-left: 43rpx;
		}

		&__text {
			font-family: PingFang-SC, PingFang-SC;
			font-weight: bold;
			font-size: 32rpx;
			color: #000000;
			line-height: 32rpx;
			margin-left: 6rpx;
		}

		&__t {
			font-family: PingFang-SC, PingFang-SC;
			font-weight: 500;
			font-size: 24rpx;
			color: #616065;
			line-height: 24rpx;

			margin: 20rpx 0 30rpx;
			margin-left: 43rpx;
		}

	}

	.list {
		display: flex;
		align-items: center;
		justify-content: space-between;
		flex-wrap: wrap;
		padding-bottom: 30rpx;
	}
</style>